home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cchh01.arc
/
IOS1.H
< prev
next >
Wrap
C/C++ Source or Header
|
1986-03-14
|
1KB
|
56 lines
/**
*
* The following structure is a UNIX file block that retains information about
* a file being accessed via the level 1 I/O functions.
*/
struct UFB
{
char ufbflg; /* flags */
#if MSDOS1
char ufbtyp; /* device type */
#endif
#if MSDOS
int ufbfh; /* file handle */
#if MSDOS1
struct FCB ufbfcb; /* file control block */
#endif
#else
struct FAB
{
struct FCB fcb; /* file control block */
char wf; /* buffer write flag */
long fpos; /* file position */
long eof; /* end of file */
long peof; /* previous end of file */
unsigned bn; /* block number */
char b[128]; /* block buffer */
}
ufbfcb;
#endif
};
#define NUFBS 20 /* number of UFBs defined */
/*
*
* UFB.ufbflg definitions
*
*/
#define UFB_OP 0x80 /* file is open */
#define UFB_RA 0x40 /* reading is allowed */
#define UFB_WA 0x20 /* writing is allowed */
#define UFB_NT 0x10 /* access file with no translation */
#define UFB_AP 8 /* append mode flag */
/*
*
* UFB.ufbtyp definitions
*
*/
#if MSDOS1
#define D_DISK 0
#define D_CON 1
#define D_PRN 2
#define D_AUX 3
#define D_NULL 4
#endif